Upgrade Effect to beta.103 - #5331
Conversation
- Migrate schema and HTTP APIs to the new Effect release - Enable built-in HTTP and WebSocket compression - Update MCP transport to protocol 2025-06-18
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
ApprovabilityVerdict: Approved 3bba438 Dependency upgrade from Effect beta.102 to beta.103 with mechanical API migrations (schema constructors, error constructors) and adoption of built-in HTTP compression middleware. All changes follow library upgrade patterns with no novel runtime behavior. You can customize Macroscope's approvability policy. Learn more. |
## What's Changed * fix(web): blink the terminal cursor again by @StiensWout in pingdotgg/t3code#5314 * fix(terminal): protect held Ctrl/Cmd+W close shortcut by @StiensWout in pingdotgg/t3code#5322 * fix(server): strip replayable terminal queries from history by @StiensWout in pingdotgg/t3code#5319 * fix(contracts): decode ServerProviders forward-compatibly by @Brechard in pingdotgg/t3code#5327 * fix(web): simplify chat code blocks by @t3-code[bot] in pingdotgg/t3code#5301 * fix(web): align multiline error alert controls by @t3-code[bot] in pingdotgg/t3code#5304 * Upgrade Effect to beta.103 by @juliusmarminge in pingdotgg/t3code#5331 ## New Contributors * @Brechard made their first contribution in pingdotgg/t3code#5327 **Full Changelog**: pingdotgg/t3code@v0.0.32-nightly.20260804.993...v0.0.32-nightly.20260804.997 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.32-nightly.20260804.997
Brings in 17 upstream commits (base e60821f). Headline changes: - Upgrade Effect to beta.103 (pingdotgg#5331), which removes the `Schema.UnknownFromJsonString` export and drops the positional actual argument from `SchemaIssue.InvalidValue`. - Replace the hand-rolled gzip path with `HttpMiddleware.compression()`, deleting apps/server/src/httpCompression/ entirely (pingdotgg#5331). - Extract desktop base/state dir resolution into DesktopStatePaths.ts, and add Linux secret storage, URL-scheme claiming, and early-startup modules (pingdotgg#2916, pingdotgg#5054). - Mobile provider icons for Grok, Cursor, and OpenCode (pingdotgg#4586). - Web polish: chat code blocks, tooltip z-index, spacing, loading screen, terminal cursor blink, terminal close-shortcut guard. Manual resolution and why: - apps/desktop/src/app/DesktopEnvironment.ts — semantic. Upstream deleted the `configuredBaseDir` local that the fork's branding override sat on top of, moving that logic into resolveDesktopBaseDir/resolveDesktopStateDir. Took upstream's extraction wholesale and re-applied the fork's displayNameOverride intent on it. The fork additionally gains upstream's trimming of a blank T3_HOME, which the old inline version did not do. - apps/mobile/src/components/ProviderIcon.tsx — the fork had replaced raw `props.provider === ...` checks with a resolveProviderIconKind seam; upstream's three new icons used the raw form. Routed them through the seam instead of mixing both styles, extended ProviderIconKind, and added test coverage so the new kinds cannot silently fall back to the OpenAI icon. - apps/server/src/textGeneration/CodexTextGeneration.ts — mechanical. Took upstream's one-line Schema change, kept the fork's rewrite of the rest. Merge-caused fixes beyond the conflicts: - Swept 15 fork-only call sites from `Schema.UnknownFromJsonString` to `Schema.fromJsonString(Schema.Unknown)`. These produced no conflict markers; the export simply no longer exists in beta.103. Upstream's own OrchestrationEventStore.ts survives only because it defines a local alias of the same name. Verified: pnpm install, pnpm typecheck (15/15 projects clean), pnpm test. Five failures remain in packages/shared (relayClient, logging); those four files are byte-identical to both upstream/main and the pre-merge backup, and assert POSIX-only behavior (linux-x64 fixture paths, forward-slash path comparisons, ENAMETOOLONG). They cannot pass on Windows and are unrelated to this merge. Backup of the pre-merge tip: backup/dev-before-merge-20260804
What Changed
Why
Keeps the repository aligned with the latest Effect beta APIs and removes compatibility workarounds that are no longer needed. The HTTP and WebSocket updates adopt the platform-supported compression behavior while preserving existing server and client functionality.
UI Changes
The update includes minor code block and alert styling changes. Before/after screenshots are not included.
Checklist
Note
Medium Risk
Wide dependency and API churn touches HTTP compression, WebSocket negotiation, MCP protocol version, and RPC client patches—core transport paths that need regression testing on Node and Bun.
Overview
Upgrades the monorepo from Effect 4.0.0-beta.102 to beta.103 (catalog, lockfile, workspace) and drops platform-bun/node patches that are now covered by upstream server options.
Schema / API migrations replace
Schema.UnknownFromJsonStringwithSchema.fromJsonString(Schema.Unknown)and simplifySchemaIssue.InvalidValue(noOptionwrapper) across server, relay, desktop, packages, and tests.HTTP compression removes the custom
HttpResponseCompressionservice and usesHttpMiddleware.compression()viahttpCompressionLayer. The relay worker stubHttpPlatformadds a no-op compression surface for the web platform.WebSockets configure
perMessageDeflateon Bun (dedicated compress / shared decompress) and Node (perMessageDeflate: true), with a test layer that mirrors production deflate negotiation.MCP targets
McpProtocol.v2025_06_18and tests expect structuredInvalidParamsfor bad tool calls. Remaining effect and @effect/vitest patches adjust MCP DELETE handling and vite-plus/test imports.Tests / tooling: CLI bootstrap FD lifecycle uses
NodeFS.openSyncwith acquire/release; OTLP test tolerates stringintValueon span attributes.Reviewed by Cursor Bugbot for commit 3bba438. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Upgrade Effect to beta.103 and replace custom HTTP compression with
HttpMiddleware.compression()@effectpackages from4.0.0-beta.102to4.0.0-beta.103in pnpm-workspace.yaml and removes the platform-bun and platform-node patches that are no longer needed.Schema.UnknownFromJsonStringwithSchema.fromJsonString(Schema.Unknown)across all JSON encode/decode utilities, following the new Effect Schema API.SchemaIssue.InvalidValueconstruction to drop theOption.some(value)argument, passing only a message, in all custom schema filters and validators.HttpResponseCompressionservice and replaces it withHttpRouter.middleware(HttpMiddleware.compression(), { global: true })in server.ts.perMessageDeflatenegotiation to both Bun (dedicated/shared) and Node server configs, and declares MCP HTTP server support for protocol versionv2025_06_18.Macroscope summarized 3bba438.